#ifndef BUILDINGMANAGER_H
#define BUILDINGMANAGER_H

#include <SFML/Graphics.hpp>

#include <memory>

#include "BuildingBase.h"

class BuildingManager: public sf::Drawable
{
    public:
		static BuildingManager& getInstance ();

        void addBuilding (BuildingBase* newBuilding);
		void clear ();
        void updateBuildings (const sf::Time& elapsed);
        bool processLeftClickEvent (const sf::Vector2i& pos) const;
		bool processRightClickEvent (const sf::Vector2i& pos) const;
    protected:
    private:
		std::vector<std::unique_ptr<BuildingBase>> buildings;

		BuildingManager ();

		virtual void draw (sf::RenderTarget& target, sf::RenderStates states) const;
};

#endif // BUILDINGMANAGER_H
